package company;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class attack extends JPanel {
    @Override
    protected void paintComponent(Graphics g) {
        super.paintComponent(g);
        int width=getWidth();
        int height=getHeight();
        g.setColor(Color.white);
        g.fillRect(0,0,width,height);
        try {
            File flie=new File("data/attack.png");
            BufferedImage image = ImageIO.read(flie);
            g.drawImage(image,10,10,width,height,null);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
